package com.trigsoft.applist;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public class PreferenceActivity extends android.preference.PreferenceActivity implements RefreshActivity
{
	static
	{
		//AdManager.init("d21b9925f3738550 ", "25133bf65b73e550 ", 30, false, "1.4");
	}

	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		addPreferencesFromResource(R.xml.preferences);
		setContentView(R.layout.preference);

		findViewById(R.id.exportButton).setOnClickListener(new OnClickListener() {
			public void onClick(View v)
			{
				// TODO Auto-generated method stub
				new ExportTask(PreferenceActivity.this).execute();
			}
		});

		findViewById(R.id.importButton).setOnClickListener(new OnClickListener() {
			public void onClick(View v)
			{
				// TODO Auto-generated method stub
				new ImportTask(PreferenceActivity.this).execute();
			}
		});
	}

	public void setView()
	{
		startActivity(new Intent(this, PreferenceActivity.class));
		this.finish();
	}
}
